package controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import service.UserService;

import javax.servlet.http.HttpSession;

/**
 * Created with IntelliJ IDEA.
 * User: Pascal
 * Date: 13.01.14
 * Time: 23:08
 * To change this template use File | Settings | File Templates.
 */

@Controller
@RequestMapping("/admin")
public class AdminController {


    @Autowired
    UserService userService;

    @RequestMapping("/users/")
    public ModelAndView users(Model model, HttpSession httpSession) {

        ModelAndView modelAndView = new ModelAndView("users");

        return modelAndView;
    }

    @RequestMapping("/news/")
    public ModelAndView news(Model model, HttpSession httpSession) {

        ModelAndView modelAndView = new ModelAndView("news-admin");

        return modelAndView;
    }

}
